package com.boot2.core.dao.exception;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.dao.DataAccessException;

/**
* @author zhangweilin
* @date 2018/7/4 17:05 
* @description:  dao层通用异常
*/
public class DAOException extends DataAccessException
{
    private static final long serialVersionUID = 2037965146165551242L;
    protected Log loger = LogFactory.getLog(this.getClass());

    /**
     * @param message
     */
    public DAOException(String message)
    {
        super(message);
//        HttpServletRequest request = RequestContext.getRequest();
//        if (null==request) {
//            loger.error(message);
//        }
    }

    /**
     * @param message
     * @param cause
     */
    public DAOException(String message, Throwable cause)
    {
        super(message, cause);
//        HttpServletRequest request = RequestContext.getRequest();
//        if (null==request) {
//            loger.error(message, cause);
//        }
    }
}
